import threading
import time

def task(name):
    print(f"Thread {name}: Starting")
    time.sleep(2)
    print(f"Thread {name}: Finishing")

threads = []
for i in range(3):
    t = threading.Thread(target=task,args=(f"Thraead-{i+1}",))
    threads.append(t)
    t.start()

for t in threads:
    t.join()

print("所有线程完成")

